From 89017e84520531edca4814cd8388832ad21531ff Mon Sep 17 00:00:00 2001 From: Philip Van Hoof Date: Mon, 31 Dec 2007 11:26:55 +0000 Subject: [PATCH] Using GSlice for GtkTreePath 2007-12-31 Philip Van Hoof * gtk/gtktreemodel.c: Using GSlice for GtkTreePath svn path=/trunk/; revision=19292 --- ChangeLog | 4 ++++ gtk/gtktreemodel.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 28c5c20d5c..d790a88db6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-12-31 Philip Van Hoof + + * gtk/gtktreemodel.c: Using GSlice for GtkTreePath + 2007-12-31 Christian Persch * gtk/gtkprintunixdialog.c: (gtk_print_unix_dialog_get_property): diff --git a/gtk/gtktreemodel.c b/gtk/gtktreemodel.c index 2f8294b621..d6fe4c2207 100644 --- a/gtk/gtktreemodel.c +++ b/gtk/gtktreemodel.c @@ -389,7 +389,7 @@ GtkTreePath * gtk_tree_path_new (void) { GtkTreePath *retval; - retval = g_new (GtkTreePath, 1); + retval = g_slice_new (GtkTreePath); retval->depth = 0; retval->indices = NULL; @@ -632,7 +632,7 @@ gtk_tree_path_free (GtkTreePath *path) return; g_free (path->indices); - g_free (path); + g_slice_free (GtkTreePath, path); } /** @@ -650,7 +650,7 @@ gtk_tree_path_copy (const GtkTreePath *path) g_return_val_if_fail (path != NULL, NULL); - retval = g_new (GtkTreePath, 1); + retval = g_slice_new (GtkTreePath); retval->depth = path->depth; retval->indices = g_new (gint, path->depth); memcpy (retval->indices, path->indices, path->depth * sizeof (gint)); -- 2.30.2